<!DOCTYPE html>
<html>

<head>

    <title>Test</title>
    <script>



    </script>

</head>



<body>

    <span class="sparkline" data-ymin="0" data-ymax="10">
        1 1 1 2 2 3 4 5 5 4 3 5 6 7 7 4 2 1
    </span>

    <script>
       var sparkline = document.getElementsByClassName("sparkline");
       for (let i = 0; i < sparkline.length; i++) {
           var elt = sparkline[i];
           var ymin = parseFloat(elt.getAttribute("data-ymin"));
           var ymin = parseFloat(elt.getAttribute("data-ymax"));
           var points = elt.getAttribute("data-points");
           var data = elt.textContent.split(" ").map(parseFloat);
           // 这里的drawSparkline是虚构的
           drawSparkline(elt,ymin,ymax,data);
           
       }

    </script>
    


</body>

</html>